<p style="margin: 5px 0pt;"><%=link_to  '测试管理' , :action=>"index"%>>>
<%=link_to  '创建复杂倾向测试' , :action=>"new"%> >> </p>
<div id="m">
 <div id="info">
<font color="blue"> 创建步骤：创建测试 >> 添加倾向 >> <font color="red">添加章节</font>  >> 添加章节对应倾向结果 >> 添加问题 >> 完成 </font>
 </div>
<form id="addtrend" name="form2"action="/surveys/surveys/new_part" method="post" onsubmit="" class="required-validate">
    <%= tag(:input, :type => "hidden", :name => request_forgery_protection_token.to_s, 
                 :value => form_authenticity_token) %> 
       <% i=1%>
      <input type="hidden" name="t_id" value=<%=@parts[0].survey_id%>></input>
    <% for p in @parts %>
     第&nbsp;&nbsp;<%=i%>&nbsp;&nbsp; 部分 <br/>
     &nbsp;&nbsp;名&nbsp;&nbsp;称&nbsp;&nbsp;&nbsp;：
        <input id="name<%=i.to_s%>"name="part<%=i.to_s%>[name]" type="text" class="required min-length-1"/>
        <%=error_message_on :part , :name%><br/>
        <input type="hidden" name="part<%=i.to_s%>[survey_id]" value=<%=p.survey_id%></input>
         &nbsp;&nbsp;description:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         <textarea cols="35" rows="5" id="description<%=i.to_s%>"
         name="part<%=i.to_s%>[description]"  style="width:60;border: 1px solid ;" 
         class="required"/></textarea><br/><br />
   <% i=i+1 %>
   <% end %>
      <input type="hidden" name="num" value=<%=i-1%>>
      <input type="submit" value="下一步>>"   style="margin-left: 150px"/><br />
</form>
</div>

